/**
 * Created by Killer on 2016/1/2.
 */
$(document).ready(function () {
    $("#LoginOut").click(function () {
        $.ajax({
            url: "/fallwings/loginOut",
            type: "get",
            statusCode: {
                200: function () {
                    window.location.href = "/fallwings/login.html";
                }
            }
        })
    });
    $("#userTop-right").html(user["userId"]);
    $("#myIntegral").html("我的积分："+user["integral"]);
    isAdministrator();

})
function isAdministrator(){
    if(user["root"]==2){
        $("#LoginOut").parent().before("<li ><a id=\"manage\">管理界面</a></li>");
    }
}